﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace multiple
{
    class Program
    {
        static void Main(string[] args)
        { 
        MyMath a = new MyMath();
        Console.WriteLine("两个数的最小公倍数是{0}", a.Lcm(20,30));
            Console.ReadKey();
        }

}
class MyMath
{
    public int Lcm(int a, int b)
    {
        int i = 1, k;
        k = a;
        while (a % b != 0)
        {
            a = k * i;
            i++;
        }
        return a;
    }
}
    }

